package com.example.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.mapper.CommentMapper;
import com.example.pojo.Comment;
import com.example.service.ICommentService;
import com.example.vo.UserComment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
@Service
public class CommentServiceImpl extends ServiceImpl<CommentMapper, Comment> implements ICommentService {

    @Autowired
    private CommentMapper commentMapper;

    public List<Comment> getAllComments() {
        return commentMapper.getAllComments();
    }


    public List<UserComment> getCommentsByContentId(Long contentId) {
        return commentMapper.getCommentsByContentId(contentId);
    }


}
